from collections.abc import Iterator

from .events import InputEvent

class EvdevError(Exception): ...

class EventIO:
    def fileno(self) -> int: ...
    def read_loop(self) -> Iterator[InputEvent]: ...
    def read_one(self) -> InputEvent | None: ...
    def read(self) -> Iterator[InputEvent]: ...
    def write_event(self, event: InputEvent) -> None: ...
    def write(self, etype: int, code: int, value: int) -> None: ...
    def close(self) -> None: ...
